<%@ page import="java.sql.ResultSet" %>
<%@ page import="com.gzsz.util.DBUtil" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<html class="no-js" lang="en">

<head>
    <style>
        .search-box {
            width: 40%; /* 设置宽度为 100% */
            height: 36px; /* 设置高度 */
            line-height: 36px; /* 设置行高 */
            font-size: 14px; /* 设置字体大小 */
            padding: 0 8px; /* 设置内边距 */
            margin: 8px 0; /* 设置外边距 */
            display: inline-block;
            border: 1px solid #ccc; /* 设置边框颜色 */
            box-sizing: border-box; /* 确保宽度包括内边距和边框 */
            border-radius: 5px;
        }
        .search-btn{
            width: 10%; /* 设置宽度为 100% */
            height: 36px; /* 设置高度 */
            line-height: 36px; /* 设置行高 */
            font-size: 14px; /* 设置字体大小 */
            padding: 0 8px; /* 设置内边距 */
            margin: 8px 0; /* 设置外边距 */
            display: inline-block;
            border: 1px; /* 设置边框颜色 */
            box-sizing: border-box; /* 确保宽度包括内边距和边框 */
            background-color: #51bafc;
            border-radius: 5px;
        }
    </style>
    <base href="<%=request.getContextPath()%>/html/">
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>护士信息表</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" type="image/png" href="/webapps_Web_exploded/html1/assets/images/icon/favicon.ico">
    <link rel="stylesheet" href="/webapps_Web_exploded/html1/assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="/webapps_Web_exploded/html1/assets/css/font-awesome.min.css">
    <link rel="stylesheet" href="/webapps_Web_exploded/html1/assets/css/themify-icons.css">
    <link rel="stylesheet" href="/webapps_Web_exploded/html1/assets/css/metisMenu.css">
    <link rel="stylesheet" href="/webapps_Web_exploded/html1/assets/css/owl.carousel.min.css">
    <link rel="stylesheet" href="/webapps_Web_exploded/html1/assets/css/slicknav.min.css">
    <!-- amchart css -->
    <link rel="stylesheet" href="/webapps_Web_exploded/html1/assets/css/export.css" type="text/css" media="all" />
    <!-- others css -->
    <link rel="stylesheet" href="/webapps_Web_exploded/html1/assets/css/typography.css">
    <link rel="stylesheet" href="/webapps_Web_exploded/html1/assets/css/default-css.css">
    <link rel="stylesheet" href="/webapps_Web_exploded/html1/assets/css/styles.css">
    <link rel="stylesheet" href="/webapps_Web_exploded/html1/assets/css/responsive.css">
    <!-- modernizr css -->
    <script src="/webapps_Web_exploded/html1/assets/js/vendor/modernizr-2.8.3.min.js"></script>
</head>

<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<!-- preloader area start -->
<div id="preloader">
    <div class="loader"></div>
</div>
<!-- preloader area end -->
<!-- page container area start -->
<div class="page-container">
    <!-- sidebar menu area start -->
    <div class="sidebar-menu">
        <%@include file="left.jsp"%>
    </div>
    <!-- sidebar menu area end -->
    <!-- main content area start -->
    <div class="main-content">
        <!-- page title area start -->
        <%@include file="header.jsp"%>
        <!-- page title area end -->
        <div class="main-content-inner">
            <div class="row">
                <!-- table light start -->
                <div class="col-lg-12 mt-5">
                    <div class="card">
                        <!-- header area start -->
                        <div class="header-area">
                            <form action="/webapps_Web_exploded/nurse" method="get">
                                <input type="text" class="search-box" name="nurse_name" placeholder="请输入护士姓名">
                                <select class="search-box" id="title" name="title">
                                    <option value="">请选择护士职称</option>
                                    <option>护士</option>
                                    <option>护师</option>
                                    <option>主管护师</option>
                                    <option>副主任护师</option>
                                    <option>主任护师</option>
                                </select>
                                <input type="hidden" value="search" name="method">
                                <input type="submit" value="查询" class="search-btn">
                            </form>
                        </div>
                        <!-- header area end -->
                        <div class="card-body">
                            <h4 class="header-title">护士信息</h4>
                            <div class="single-table">
                                <div class="table-responsive">
                                    <table class="table text-center">
                                        <thead class="text-uppercase bg-light">
                                        <tr>
                                            <th scope="col">护士#</th>
                                            <th scope="col">姓名</th>
                                            <th scope="col">性别</th>
                                            <th scope="col">年龄</th>
                                            <th scope="col">职称</th>
                                            <th scope="col">联系电话</th>
                                            <th scope="col">电子邮箱</th>
                                            <th scope="col">操作</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <%
                                            ResultSet resultSet=(ResultSet) request.getAttribute("nurse_list");//拆箱
                                            while (resultSet.next()) {
                                        %>
                                        <tr class="border-b hover:bg-gray-50 transition-colors">
                                            <td><%=resultSet.getInt("nurse_id")%></td>
                                            <td><%=resultSet.getString("nurse_name")%></td>
                                            <td><%=resultSet.getString("gender")%></td>
                                            <td><%=resultSet.getInt("age")%></td>
                                            <td><%=resultSet.getString("title")%></td>
                                            <td><%=resultSet.getString("contact_number")%></td>
                                            <td><%=resultSet.getString("email")%></td>
                                            <td>
                                                <a href="/webapps_Web_exploded/nurse?method=delete&nurse_id=<%=resultSet.getInt("nurse_id")%>"
                                                   onclick="return confirm('是否删除这条记录')">删除</a>
                                                <a href="/webapps_Web_exploded/html1/nurse-edit.jsp?nurse_id=<%=resultSet.getInt("nurse_id")%>">编辑</a>
                                            </td>
                                        </tr>
                                        <%
                                            }
                                            resultSet.close();
                                        %>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- table light end -->
            </div>
        </div>
    </div>
    <!-- main content area end -->
    <!-- footer area start-->
    <footer>
        <div class="footer-area">
            <p>胸腺外科管理系统</p>
        </div>
    </footer>
    <!-- footer area end-->
</div>
<!-- page container area end -->
<!-- offset area start -->
<div class="offset-area">
    <div class="offset-close"><i class="ti-close"></i></div>
    <ul class="nav offset-menu-tab">
        <li><a class="active" data-toggle="tab" href="#activity">Activity</a></li>
        <li><a data-toggle="tab" href="#settings">Settings</a></li>
    </ul>
    <div class="offset-content tab-content">
        <div id="activity" class="tab-pane fade in show active">
            <div class="recent-activity">
                <div class="timeline-task">
                    <div class="icon bg1">
                        <i class="fa fa-envelope"></i>
                    </div>
                    <div class="tm-title">
                        <h4>Rashed sent you an email</h4>
                        <span class="time"><i class="ti-time"></i>09:35</span>
                    </div>
                    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse distinctio itaque at.
                    </p>
                </div>
                <div class="timeline-task">
                    <div class="icon bg2">
                        <i class="fa fa-check"></i>
                    </div>
                    <div class="tm-title">
                        <h4>Added</h4>
                        <span class="time"><i class="ti-time"></i>7 Minutes Ago</span>
                    </div>
                    <p>Lorem ipsum dolor sit amet consectetur.
                    </p>
                </div>
                <div class="timeline-task">
                    <div class="icon bg2">
                        <i class="fa fa-exclamation-triangle"></i>
                    </div>
                    <div class="tm-title">
                        <h4>You missed your Password!</h4>
                        <span class="time"><i class="ti-time"></i>09:20 Am</span>
                    </div>
                </div>
                <div class="timeline-task">
                    <div class="icon bg3">
                        <i class="fa fa-bomb"></i>
                    </div>
                    <div class="tm-title">
                        <h4>Member waiting for you Attention</h4>
                        <span class="time"><i class="ti-time"></i>09:35</span>
                    </div>
                    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse distinctio itaque at.
                    </p>
                </div>
                <div class="timeline-task">
                    <div class="icon bg3">
                        <i class="ti-signal"></i>
                    </div>
                    <div class="tm-title">
                        <h4>You Added Kaji Patha few minutes ago</h4>
                        <span class="time"><i class="ti-time"></i>01 minutes ago</span>
                    </div>
                    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse distinctio itaque at.
                    </p>
                </div>
                <div class="timeline-task">
                    <div class="icon bg1">
                        <i class="fa fa-envelope"></i>
                    </div>
                    <div class="tm-title">
                        <h4>Ratul Hamba sent you an email</h4>
                        <span class="time"><i class="ti-time"></i>09:35</span>
                    </div>
                    <p>Hello sir , where are you, i am egerly waiting for you.
                    </p>
                </div>
                <div class="timeline-task">
                    <div class="icon bg2">
                        <i class="fa fa-exclamation-triangle"></i>
                    </div>
                    <div class="tm-title">
                        <h4>Rashed sent you an email</h4>
                        <span class="time"><i class="ti-time"></i>09:35</span>
                    </div>
                    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse distinctio itaque at.
                    </p>
                </div>
                <div class="timeline-task">
                    <div class="icon bg2">
                        <i class="fa fa-exclamation-triangle"></i>
                    </div>
                    <div class="tm-title">
                        <h4>Rashed sent you an email</h4>
                        <span class="time"><i class="ti-time"></i>09:35</span>
                    </div>
                </div>
                <div class="timeline-task">
                    <div class="icon bg3">
                        <i class="fa fa-bomb"></i>
                    </div>
                    <div class="tm-title">
                        <h4>Rashed sent you an email</h4>
                        <span class="time"><i class="ti-time"></i>09:35</span>
                    </div>
                    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse distinctio itaque at.
                    </p>
                </div>
                <div class="timeline-task">
                    <div class="icon bg3">
                        <i class="ti-signal"></i>
                    </div>
                    <div class="tm-title">
                        <h4>Rashed sent you an email</h4>
                        <span class="time"><i class="ti-time"></i>09:35</span>
                    </div>
                    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse distinctio itaque at.
                    </p>
                </div>
            </div>
        </div>
        <div id="settings" class="tab-pane fade">
            <div class="offset-settings">
                <h4>General Settings</h4>
                <div class="settings-list">
                    <div class="s-settings">
                        <div class="s-sw-title">
                            <h5>Notifications</h5>
                            <div class="s-swtich">
                                <input type="checkbox" id="switch1" />
                                <label for="switch1">Toggle</label>
                            </div>
                        </div>
                        <p>Keep it 'On' When you want to get all the notification.</p>
                    </div>
                    <div class="s-settings">
                        <div class="s-sw-title">
                            <h5>Show recent activity</h5>
                            <div class="s-swtich">
                                <input type="checkbox" id="switch2" />
                                <label for="switch2">Toggle</label>
                            </div>
                        </div>
                        <p>The for attribute is necessary to bind our custom checkbox with the input.</p>
                    </div>
                    <div class="s-settings">
                        <div class="s-sw-title">
                            <h5>Show your emails</h5>
                            <div class="s-swtich">
                                <input type="checkbox" id="switch3" />
                                <label for="switch3">Toggle</label>
                            </div>
                        </div>
                        <p>Show email so that easily find you.</p>
                    </div>
                    <div class="s-settings">
                        <div class="s-sw-title">
                            <h5>Show Task statistics</h5>
                            <div class="s-swtich">
                                <input type="checkbox" id="switch4" />
                                <label for="switch4">Toggle</label>
                            </div>
                        </div>
                        <p>The for attribute is necessary to bind our custom checkbox with the input.</p>
                    </div>
                    <div class="s-settings">
                        <div class="s-sw-title">
                            <h5>Notifications</h5>
                            <div class="s-swtich">
                                <input type="checkbox" id="switch5" />
                                <label for="switch5">Toggle</label>
                            </div>
                        </div>
                        <p>Use checkboxes when looking for yes or no answers.</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- offset area end -->
<!-- jquery latest version -->
<script src="/webapps_Web_exploded/html1/assets/js/vendor/jquery-2.2.4.min.js"></script>
<!-- bootstrap 4 js -->
<script src="/webapps_Web_exploded/html1/assets/js/popper.min.js"></script>
<script src="/webapps_Web_exploded/html1/assets/js/bootstrap.min.js"></script>
<script src="/webapps_Web_exploded/html1/assets/js/owl.carousel.min.js"></script>
<script src="/webapps_Web_exploded/html1/assets/js/metisMenu.min.js"></script>
<script src="/webapps_Web_exploded/html1/assets/js/jquery.slimscroll.min.js"></script>
<script src="/webapps_Web_exploded/html1/assets/js/jquery.slicknav.min.js"></script>

<!-- others plugins -->
<script src="/webapps_Web_exploded/html1/assets/js/plugins.js"></script>
<script src="/webapps_Web_exploded/html1/assets/js/scripts.js"></script>
<%--<script>--%>
<%--    const search = document.getElementById("search");--%>
<%--    search.addEventListener("keyup", (e) => {--%>
<%--        if (e.key === "Enter") {--%>
<%--            const text = e.target.value;--%>
<%--            window.location.href = "users-table.jsp?search=" + text;--%>
<%--        }--%>
<%--    })--%>
<%--</script>--%>
</body>

</html>